package com.netty.bio;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.Socket;

public class TimeClientBio {

    public static void main(String[] args) {
        Socket socket = null;
        try {
            socket = new Socket("127.0.0.1", 8080);
            BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(socket.getInputStream()));
            PrintWriter out = new PrintWriter(socket.getOutputStream(), true);
            out.println("Query Time ===");
            System.out.println("send Query Time === to server");
            String s = bufferedReader.readLine();
            System.out.println("LocalDateTime : " + s);
        } catch (IOException e) {
            e.printStackTrace();
        }

    }
}
